package com.green.model.manage.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 操作码
 * @author 
 */
public enum OperateCodeEnum {
	BROKER("经纪人管理",""),
	CONTRACT("合同管理","");
	
	private OperateCodeEnum(){}
	private OperateCodeEnum(String name,String value){
		this.name = name;
		this.value = value;
	}
	private String name;
	private String value;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static List toList(){
		OperateCodeEnum[] ary = OperateCodeEnum.values();
		List bank = new ArrayList();
		for(int i=0;i<ary.length;i++){
			Map<String,String> map = new HashMap<String,String>();
			map.put("value", ary[i].toString());
			map.put("name", ary[i].getName());
			bank.add(map);
		}
		return bank;
	}

}
